package io;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class KeyinTest {

    public static void main(String[] args) throws IOException {

        InputStreamReader reader = new InputStreamReader(System.in);
        //将普通的Reader包装成BufferedReader
        BufferedReader br = new BufferedReader(reader);
        String s = null;
        while ((s = br.readLine()) != null) {
            if (s.equals("exit")) {
                System.exit(1);
            }
            System.out.println("输入内容为： " + s);
        }

        reader.close();
        br.close();


    }
}
